<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected function _initView()
    {
        // Initialize view
        $view = new PC4_View();
        $view->doctype('XHTML1_STRICT');
        
        $config = $this->getOption('site');
        $view->headTitle($config['titulo']);
        
        // adiciona o caminho das views padrões
        $view->addBasePath(LIB_PATH . 'PC4/Views');
        
        $view->addHelperPath(LIB_PATH . 'PC4/View/Helper', 'PC4_View_Helper');
 
        // Add it to the ViewRenderer
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
            'ViewRenderer' 
        );
        $viewRenderer->setView($view);
        
        // Return it, so that it can be stored by the bootstrap
        return $view;
    }
    
	/**
     *
     * Register plugins
     */
    protected function _initControllerPlugins()
    {
        $front = Zend_Controller_Front::getInstance();
        $front->registerPlugin(new PC4_Controlador_Plugin_InitJS());
        $front->registerPlugin(new PC4_Controlador_Plugin_InitSimplaAdmin());
    }
    
}
